package admin

import database "hft/Database"

type CommonTag struct {
	database.Base
	Name        string    `json:"name,omitempty"`
	AccountId   int       `json:"accountId,omitempty" gorm:"index"`
	AccountName string    `json:"account_name,omitempty"`
	AccountLink string    `json:"account_link,omitempty" gorm:"index"`
	LouPan      []*LouPan `json:"loupan,omitempty" gorm:"many2many:_loupan_tag;foreignKey:ID;references:ID;constraint:OnDelete:CASCADE,OnUpdate:CASCADE"`
}

func (CommonTag) TableName() string {
	return database.TableNameFormat("common_tags")
}
